<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

/**
 * 单个路由设置
 * http://127.0.0.1/hello/zhangshan
 * http://127.0.0.1/nihao/wangwu
 */

//Route::rule('hello/:name','api/routedemo/hello');
//Route::rule('nihao/:name','api/routedemo/nihao');

/**
 * 分组路由
 * http://127.0.0.1/default/aaa
 * http://127.0.0.1/default/bbb/wangwu
 */
//Route::group('default',[
//    'aaa'    => ['api/routedemo/demo1'],
//    'bbb/:name'    => ['api/routedemo/demo2']
//],['method'=>'get']);

/**
 * 域名绑定到模块
 * 绑定前：http://api.xgl.com/api/payment/eee
 * 绑定后：http://api.xgl.com/payment/eee
 */
//Route::domain('api','api');
//Route::domain('admin','admin');

/**
 * 二级泛域名绑定到一个函数来识别，eg 谁的主页
 * http://blog.xgl.com/，就会把blog传入到username
 */
//Route::domain('*','api/routedemo/demo5?username=*');